package com.liohi.AllEunm;


public enum MyErrorCode {
    SUCCESS(1200, "操作成功"),
    SUCCESS_LOGGED(1203, "已登录"),
    ERROR(1500, "操作失败"),
    ERROR_LOGIN(1600, "登录失败"),
    ERROR_TOKEN(1602, "TOKEN失效或者错误"),
    ERROR_ARG(1601, "参数错误"),
    ERROR_AUTH(1606, "认证失败"),
    ERROR_QUERY(1608, "数据丢失"),
    ERROR_EMPTY_PARAM(100, "参数为空"),
    ERROR_UNKNOWN_ERROR(1, "未知错误"),
    ERROR_PERMISSION_ERROR(2, "权限不够"),
    ERROR_UNLOGIN_USER(3, "用户未登录"),
    ERROR_PARMA_ERROR(4, "未知参数错误"),
    ERROR_USERNAME_OR_PASSWORD(1609, "用户名或密码错误"),
    ERROR_USERNAME_OR_PASSWORD_NOT_NULL(1609, "用户名或密码不能为空"),
    TOKEN_IS_NULL(4396, "token过期或者为空，请重新登录"),
    ERROR_IS_EXTISED(4397, "用户已存在"),
    ERROR_USER(4398, "姓名或密码错误");


    private final int code;
    private final String msg;

    /**
     * @param code
     * @param msg
     */
    private MyErrorCode(final int code, final String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}